package com.huawei.appmarket.service.distribution.thirddistribution.bean;

import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseDetailResponse.LayoutData;
import java.util.List;
import java.util.Locale;
import o.cib;
import o.Logger;
import org.json.JSONArray;
import org.json.JSONObject;

public class LayoutDataMini<T> extends LayoutData {
    private static final String TAG = "LayoutDataMini";
    private static final String TRAN_LAYOUT_ID = "layoutId";
    private static final String TRAN_LAYOUT_NAME = "layoutName";
    private static final String TRAN_NAME = "dataMiniList";
    private List<T> dataMiniList_ = null;

    public List<T> ʽ() {
        return this.dataMiniList_;
    }

    public void ˊ(List<T> list) {
        this.dataMiniList_ = list;
    }

    public void fromJson(JSONObject jSONObject) throws IllegalArgumentException {
        try {
            if (jSONObject.has(TRAN_LAYOUT_NAME)) {
                ॱ(jSONObject.getString(TRAN_LAYOUT_NAME));
            }
            if (jSONObject.has(TRAN_LAYOUT_ID)) {
                ˋ(jSONObject.getLong(TRAN_LAYOUT_ID));
            }
            if (jSONObject.has(TRAN_NAME)) {
                JSONArray jSONArray = (JSONArray) jSONObject.get(TRAN_NAME);
                if (jSONObject.has(TRAN_LAYOUT_NAME)) {
                    this.dataMiniList_ = (List) listFromJson(cib.ˊ(ˏ().toLowerCase(Locale.US)), jSONArray);
                }
            }
        } catch (Exception e) {
            Logger.ˋ(TAG, "fromJson(JSONObject jsonObject) Exception:" + e.getClass().getSimpleName() + ",layoutName_: " + ˏ());
        }
    }
}
